package com.zhoushihao.class0808;

import java.util.Scanner;

public class GoodLuck {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
//        String s = sc.next();
//        System.out.println(s);
        int n = sc.nextInt();
        String[] str = new String[n];
        for (int i = 0; i <= n; i++) {
            str[i] = sc.next();
        }
        for (int i = 0; i < n; i++) {
            int pre = 0;
            int next = 0;
            for (int j = 0; j < 3; j++) {
                pre+= str[i].charAt(j)-'0';
            }
            for (int j = 3; j < 6; j++) {
                next+= str[i].charAt(j)-'0';
            }
            if (pre==next) {
                System.out.println("You are lucky!");
            }else {
                System.out.println("Wish you good luck.");
            }
        }
    }
}
